package com.xuetang9.t9.hotel.beans;


import java.text.SimpleDateFormat;
import java.util.Date;

public class EFood {

  private long id;
  private String name;
  private String foodDescribe;
  private double price;
  private double costPrice;
  private long category;
  private EFoodcategory foodcategory;
  private long inventoryCount;
  private long orderCount;
  private long unregCount;
  private String picPath;
  private String len = "0";
  private long clear;
  private Date createTime;

  public EFood() {
  }

  public EFood(long id, String name, String foodDescribe, double price, double costPrice, long category, long inventoryCount, String picPath) {
    this.id = id;
    this.name = name;
    this.foodDescribe = foodDescribe;
    this.price = price;
    this.costPrice = costPrice;
    this.category = category;
    this.inventoryCount = inventoryCount;
    this.picPath = picPath;
  }

  public EFood(String name, String foodDescribe, double price, double costPrice, long category, long inventoryCount, String picPath) {
    this.name = name;
    this.foodDescribe = foodDescribe;
    this.price = price;
    this.costPrice = costPrice;
    this.category = category;
    this.inventoryCount = inventoryCount;
    this.picPath = picPath;
  }


    @Override
    public String toString() {
        return "EFood{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", foodDescribe='" + foodDescribe + '\'' +
                ", price=" + price +
                ", costPrice=" + costPrice +
                ", category=" + category +
                ", foodcategory=" + foodcategory +
                ", inventoryCount=" + inventoryCount +
                ", orderCount=" + orderCount +
                ", unregCount=" + unregCount +
                ", picPath='" + picPath + '\'' +
                ", len='" + len + '\'' +
                ", clear=" + clear +
                ", createTime=" + createTime +
                '}';
    }

    public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public String getFoodDescribe() {
    return foodDescribe;
  }

  public void setFoodDescribe(String foodDescribe) {
    this.foodDescribe = foodDescribe;
  }


  public double getPrice() {
    return price;
  }

  public void setPrice(double price) {
    this.price = price;
  }


  public double getCostPrice() {
    return costPrice;
  }

  public void setCostPrice(double costPrice) {
    this.costPrice = costPrice;
  }


  public long getCategory() {
    return category;
  }

  public void setCategory(long category) {
    this.category = category;
  }

    public EFoodcategory getFoodcategory() {
        return foodcategory;
    }

    public void setFoodcategory(EFoodcategory foodcategory) {
        this.foodcategory = foodcategory;
    }

    public long getInventoryCount() {
    return inventoryCount;
  }

  public void setInventoryCount(long inventoryCount) {
    this.inventoryCount = inventoryCount;
  }


  public long getOrderCount() {
    return orderCount;
  }

  public void setOrderCount(long orderCount) {
    this.orderCount = orderCount;
  }


  public long getUnregCount() {
    return unregCount;
  }

  public void setUnregCount(long unregCount) {
    this.unregCount = unregCount;
  }


  public String getPicPath() {
    return picPath;
  }

  public void setPicPath(String picPath) {
    this.picPath = picPath;
  }


  public String getLen() {
    return len;
  }

  public void setLen(String len) {
    this.len = len;
  }


  public long getClear() {
    return clear;
  }

  public void setClear(long clear) {
    this.clear = clear;
  }


  public String getCreateTime() {
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    if (createTime !=null){
      return simpleDateFormat.format(createTime);
    }
    return simpleDateFormat.format(new Date());
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

}
